/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.v1.jitclouds.mda.examples;

import br.ufba.lasid.v1.jitclouds.mda.MDA;
import br.ufba.lasid.v1.jitclouds.mda.datatypes.virtualization.IVirtualMachine;
import br.ufba.lasid.v1.jitclouds.mda.datatypes.virtualization.Xen;
import br.ufba.lasid.v1.jitclouds.mda.datatypes.virtualization.XenVirtualMachine;

/**
 *
 * @author aliriosa
 */
public class XenSample {
    public static void main(String[] args) throws Exception{
        MDA.startup();
        MDA.BaseOptions.setProperty(MDA.HypervisorTag, "xen");        
        Xen xen = (Xen)MDA.createHypervisor();
        
        for(IVirtualMachine machine : xen.getMachines()){
            xen.startup((XenVirtualMachine)machine);
        }
        
        for(IVirtualMachine machine : xen.getMachines()){
            xen.shutdown((XenVirtualMachine)machine);
        }
                
    }
    
}
